<!--#
layout("/layouts/platform.html"){
#-->
<script src="${base!}/assets/platform/vendor/ueditor/ueditor.config.js"></script>
<script src="${base!}/assets/platform/vendor/ueditor/ueditor.all.js"></script>
<header class="header navbar bg-white shadow">
    <div class="pull-right">
        <div class="btn-group tool-button">
            <button id="save" class="btn btn-primary navbar-btn" data-loading-text="${msg['globals.button.confirm.tip']}">${msg['globals.button.save']}</button>
        </div>
    </div>
</header>

<div class="content-wrap">
    <div class="wrapper" style="min-height:500px;">
        <section class="panel panel-form">
            <form id="editForm" role="form" class="form-horizontal parsley-form" data-parsley-validate
                  action="${base}/platform/store/config/config/editDo" method="post">
                <input name="id" type="hidden" value="${obj.id}">
                <div class="row mb10 mt10">
                    <div class="col-lg-12">
                        <div class="form-group">
                            <label for="regNote" class="col-sm-2 control-label">${msg['store.config.column.regNote']}</label>
                            <div class="col-sm-8">
                                <textarea id="regNote" name="regNote" style="width:100%;height:200px;">${obj.regNote!}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="nendCompanyInfo" class="col-sm-2 control-label">${msg['store.config.column.nendCompanyInfo']}</label>
                            <div class="col-sm-8">
                                <input type="checkbox" id="nendCompanyInfo" name="nendCompanyInfo" class="form-control js-switch-blue" <!--#if(obj.nendCompanyInfo){#-->checked<!--#}#-->>

                            </div>
                        </div>
                        <div class="form-group">
                            <label for="nendBankInfo" class="col-sm-2 control-label">${msg['store.config.column.nendBankInfo']}</label>
                            <div class="col-sm-8">
                                <input type="checkbox" id="nendBankInfo" name="nendBankInfo" class="form-control js-switch-blue" <!--#if(obj.nendBankInfo){#-->checked<!--#}#-->>

                            </div>
                        </div>
                        <div class="form-group">
                            <label for="nendAlipayInfo" class="col-sm-2 control-label">${msg['store.config.column.nendAlipayInfo']}</label>
                            <div class="col-sm-8">
                                <input type="checkbox" id="nendAlipayInfo" name="nendAlipayInfo" class="form-control js-switch-blue" <!--#if(obj.nendAlipayInfo){#-->checked<!--#}#-->>

                            </div>
                        </div>
                        <div class="form-group">
                            <label for="nendWechatInfo" class="col-sm-2 control-label">${msg['store.config.column.nendWechatInfo']}</label>
                            <div class="col-sm-8">
                                <input type="checkbox" id="nendWechatInfo" name="nendWechatInfo" class="form-control js-switch-blue" <!--#if(obj.nendWechatInfo){#-->checked<!--#}#-->>

                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3"></div>
            </form>
        </section>

    </div>
</div>
<script language="JavaScript">
    var ue;
    $(document).ready(function () {
        setTimeout(function () {
            ue= new baidu.editor.ui.Editor();
            ue.render('regNote');
        },500);
        myForm.init();
        $('#editForm').ajaxForm({
            dataType: 'json',
            beforeSubmit: function (arr, form, options) {
                form.find("button:submit").button("loading");
            },
            success: function (data, statusText, xhr, form) {
                if (data.code == 0) {
                    Toast.success(data.msg);
                } else {
                    Toast.error(data.msg);
                }
                form.find("button:submit").button("reset");
            }
        });
        $("#save").on("click",function () {
            $('#editForm').submit();
        });
    });
</script>
<!--#}#-->